package com.example.springbootServiceNetwork.demos.web.Config;


import lombok.Data;
import lombok.Getter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;


@Data
@Component
@ConfigurationProperties(prefix = "spark")
public class SparkApiConfig {
    private  String hostUrl;
    private  String appId;
    private  String apiSecret;
    private  String apiKey;

    @Getter
    private static String hostUrl1;
    @Getter
    private static String appId1;
    @Getter
    private static String apiSecret1;
    @Getter
    private static String apiKey1;

    @PostConstruct
    public void setHostUrl() {
        hostUrl1 = this.hostUrl;
    }


    @PostConstruct
    public void setAppId() {
        appId1 = this.appId;
    }


    @PostConstruct
    public void setApiSecret() {
        apiSecret1 = this.apiSecret;
    }

    @PostConstruct
    public void setApiKey() {
        apiKey1 = this.apiKey;
    }

}
